home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / Typing_Arcade / Source / PerformanceEvaluator.h < prev    next >
Text File  |  1993-01-25  |  944b  |  51 lines

  1. // (C) Copyright 1992 Jim Patterson
  2.  
  3.  
  4. #import <objc/Object.h>
  5.  
  6.  
  7. #define TA_MAX_STAT_CHARS  (100*128)
  8.  
  9. typedef struct keyStat {
  10.     char key;
  11.     int numMissed,numInGame;
  12.     float relFreq,absFreq;
  13.     char relFreqBuff[20],absFreqBuff[20];
  14. } keyStatType;
  15.  
  16.  
  17. @interface PerformanceEvaluator:Object
  18. {
  19.     id keyColumn;
  20.     id relColumn;
  21.     id absColumn;
  22.     id suggText;
  23.     keyStatType *keyInfo[128];
  24.     keyStatType *largest[6];        // pointers to 6 most common mistakes
  25.     int missedCount;
  26.     int gameCompleted;
  27.     char textBuff[TA_MAX_STAT_CHARS];
  28.     id performanceEvaluatorWindow;
  29. }
  30.  
  31. +new;
  32. - setKeyColumn:anObject;
  33. - setRelColumn:anObject;
  34. - setAbsColumn:anObject;
  35. - setSuggText:anObject;
  36. - setPerformanceEvaluatorWindow:anObject;
  37. - tellGameCompleted:(BOOL) wasCompleted;
  38. - reset;
  39. - flush;
  40. - logKeyMiss :(char) aChar;
  41. - logOccurrence :(char) aChar;
  42. - sortKeyInfo;
  43. - summarize;
  44. - debugDump;
  45. - writeInfo:(NXTypedStream *) tstream;
  46. - readInfo:(NXTypedStream *) tstream;
  47.  
  48. - free;
  49.  
  50. @end
  51.